package com.spring.team_propaganda_system.utils;
public enum ResultCode implements IResultCode {
    //异常声明
    SUCCESS(0, "ok"),
    ERROR(-1, "error"),

    //参数异常
    ERROR_SYSTEM_EXCEPTION(1001, "系统异常"),

    ERROR_PARAM_IS_BLANK(1002, "参数为空"),
    ERROR_PARAM_TYPE_BIND_ERROR(1003, "参数类形错误"),

    //用户异常
    ERROR_USER_NOT_LOGGED_IN(104001, "用户未登录，需要验证，请登录"),
    ERROR_USER_LOGIN_ERROR(104002, "账号不存在或密码错误"),
    ERROR_USER_NOT_EXIST(104003, "用户不存在"),
    ERROR_USER_HAS_EXISTED(104004, "用户已存在")

    ;//末尾分号，勿删

    private final int code;
    private final String message;

    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}